package com.top.application.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.top.application.dao.ResourceEntityMapper;
import com.top.application.entity.ResourceEntity;
import com.top.application.service.ResourceService;

/**
 * 
 * @ClassName: ResourceServiceImpl 
 * @Description: TODO(这里用一句话描述这个类的作用) 
 * @author zhaiey
 * @date 2018年3月30日 上午10:45:27 
 *
 */
@Service
public class ResourceServiceImpl implements ResourceService{
	
	@Autowired
	private ResourceEntityMapper resourceMapper;

	@Override
	public int delete(Integer id) {
		return resourceMapper.delete(id);
	}

	@Override
	public int insert(ResourceEntity record) {
		return resourceMapper.insert(record);
	}

	@Override
	public ResourceEntity selectById(Integer id) {
		return resourceMapper.selectById(id);
	}

	@Override
	public int update(ResourceEntity record) {
		return resourceMapper.update(record);
	}

	@Override
	public List<ResourceEntity> listByMap(Map<String, Object> paramMap) {
		return resourceMapper.listByMap(paramMap);
	}

	@Override
	public List<ResourceEntity> getPermissionsByRoleId(List<Integer> roleIds) {
		return resourceMapper.getPermissionsByRoleId(roleIds);
	}

}
